package org.example.chat.api;

/**
 * 自定义响应码
 * @author cheval
 */
public enum ResultCode {
    SUCCESS(200, "OK"),
    FAIL(500, "ERROR"),
    UNAUTHENTICATED(401, "请登录"),
    FORBIDDEN(403, "没有权限！"),
    VALIDATE_FAIL(400, "请求参数校验失败");

    private long code;
    private String message;

    ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public long getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
